//创建路由对象
import VueRouter from 'vue-router'
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopCartContainer from './components/tabbar/ShopCartContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import Newlist from './components/news/Newslist.vue'
import Newsinfo from './components/news/Newsinfo.vue'
import Photolist from './components/photos/Photolist.vue'
import Photoinfo from './components/photos/Photoinfo.vue'
import Goodslist from './components/goods/GoodsList.vue'
import Goodsinfo from './components/goods/GoodsInfo.vue'
import Goodsdesc from './components/goods/GoodsDesc.vue'
import Goodscomment from './components/goods/GoodsComment.vue'



var router = new VueRouter({
    routes:[
        { path:'/',redirect:'/home'},
        { path:'/home',component: HomeContainer},
        { path:'/member',component: MemberContainer},
        { path:'/shopcart',component: ShopCartContainer},
        { path:'/search',component: SearchContainer},
        { path:'/home/newslist',component:Newlist},
        { path:'/home/newsinfo:id',component:Newsinfo},
        { path:'/home/photolist',component:Photolist},
        { path:'/home/photoInfo/:id',component:Photoinfo},
        { path:'/home/goodslist', component:Goodslist},
        { path:'/home/goodsinfo/:id', component:Goodsinfo},
        { path:'/home/goodsdesc/:id', component:Goodsdesc, name:'goodsdesc'},
        { path:'/home/goodscomment/:id', component:Goodscomment,name:'goodscomment'},
    ],
    linkActiveClass: 'mui-active'
})

//把路由对象暴露出去
export default router